import request from '@/utils/request'

/**
 * @description: 计费列表获取
 * @param {*} params 参数
 * @return {*} promise
 */
export const getrulelistAPI = params => {
  return request.get('/parking/rule/list', { params })
}

/**
 * @description: 添加计费规则
 * @param {*} data 参数
 * @return {*} promise
 */
export const AddrulesAPI = data => {
  return request.post('/parking/rule', data)
}

/**
 * @description: 删除计费规则
 * @param {*} id 参数
 * @return {*} promise
 */
export const deleterulesAPI = id => {
  return request.delete(`/parking/rule/${id}`)
}

/**
 * @description: 产看计费规则
 * @param {*} id 参数
 * @return {*} promise
 */
export const viewrulesAPI = id => {
  return request.get(`/parking/rule/${id}`)
}

/**
 * @description: 编辑计费规则
 * @param {*} data 参数
 * @return {*} promise
 */
export const editrulesAPI = data => {
  return request.put('/parking/rule', data)
}
